package com.ruoyi.datastatistics.controller;

import com.ruoyi.common.core.domain.Parameter;
import com.ruoyi.datastatistics.service.RatingLevelService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
@RequestMapping("/level")
public class RatingLevelController {
    @Autowired
    private RatingLevelService ratingLevelService;

    //评价等级统计——总体合格率
    @PostMapping("/getTotallevel")
    public Map<String,Object> getTotallevel(@RequestBody Parameter parameter){
        return ratingLevelService.getTotallevel(parameter);
    }
    //评价等级统计——年龄组
    @PostMapping("/getAgegrouplevel")
    public Map<String,Object> getAgegrouplevel(@RequestBody Parameter parameter){
        return ratingLevelService.getAgegrouplevel(parameter);
    }
    //评价等级统计——年龄段
    @PostMapping("/getAgebracketlevel")
    public Map<String,Object> getAgebracketlevel(@RequestBody Parameter parameter){
        return ratingLevelService.getAgebracketlevel(parameter);
    }
    //评价等级统计——城乡工作种类
    @PostMapping("/getUrbanandrurallevel")
    public Map<String,Object> getUrbanandrurallevel(@RequestBody Parameter parameter){
        return ratingLevelService.getUrbanandrurallevel(parameter);
    }

    //评价等级统计——月份
    @PostMapping("/getMonthlevel")
    public Map<String,Object> getMonthlevel(@RequestBody Parameter parameter){
        return ratingLevelService.getMonthlevel(parameter);
    }

    //评价等级统计——下一机构
    @PostMapping("/getNextdeptlevel")
    public Map<String,Object> getNextdeptlevel(@RequestBody Parameter parameter){
        return ratingLevelService.getNextdeptlevel(parameter);
    }
}
